package shujia.day01;

import java.util.Scanner;

/*
    键盘输入两个整数，比较两个整数的最大值
 */
public class ScannerDemo2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        System.out.println("请输入第一个数值：");
        int num1 = sc.nextInt();
        System.out.println("请输入第二个数值：");
        int num2 = sc.nextInt();

        int res1 = (num1 > num2) ? num1 : num2;
        System.out.println("最大值为： " + res1);
    }
}
